package School_manage;

// person抽象类
abstract class Person {
    String name;
    int age;
    int id;

    Person(String name, int age, int id) {
        this.name = name;
        this.age = age;
        this.id = id;
    }

    public int getId() {
        return id;
    }
    @Override
    public String toString() {
        return name + " " + age +" "+id;
    }
}

//  学生抽象类
abstract class Student extends Person {

    Student(String name, int age, int id) {
        super(name, age, id);
    }
    @Override
    public String toString() {
        return name + " " + age + " " + id;
    }
}

// 本科生
class Undergraduate_Stu extends Student {
    String Grade;
    String Profession;

    Undergraduate_Stu(String name, int age, int id, String Grade, String Profession) {
        super(name, age, id);
        this.Grade = Grade;
        this.Profession = Profession;
    }
    @Override
    public String toString() {
        return super.toString() + " " + Grade + " " + Profession;
    }

}

// 研究生
class postgraduate extends Student {
    String Research_direction;

    postgraduate(String name, int age, int id, String Research_direction) {
        super(name, age, id);
        this.Research_direction = Research_direction;
    }
    @Override
    public String toString() {
        return super.toString() + " " + Research_direction;
    }
}

// 教师抽象类
abstract class Teacher extends Person {

    Teacher(String name, int age, int id) {
        super(name, age, id);
    }
}
// 专职教师类

class full_time_teacher extends Teacher {
    String job_title;

    full_time_teacher(String name, int age, int id, String job_title) {
        super(name, age, id);
        this.job_title = job_title;
    }
    @Override
    public String toString() {
        return super.toString() + " " + job_title;
    }
}

// 兼职教师
class Part_time_teacher extends Teacher {
    String job_position;

    Part_time_teacher(String name, int age, int id, String Job_Position) {
        super(name, age, id);
        this.job_position = Job_Position;
    }
    @Override
    public String toString() {
        return super.toString() + " " + job_position;
    }
}
